package first;

public class Circle extends Shape{
	private double x;
	private double y;
	private double r;
	
	public Circle(double x,double y,double r) {
		this.x=x;
		this.y=y;
		this.r=r;
	}
	
	public double getArea(double r) {
		return Math.PI*r*r;
	}
	
	public boolean isContains(Point P) {
		if(P.distance(x, y) < r) {
			return true;
		}
		else {
			return false;
		}
	}
	public boolean isContains(int a,int b) {
		Point P=new Point(a,b);
		if(P.distance(x, y) < r) {
			return true;
		}
		else {
			return false;
		}
	}
	public String toString() {
		return "the Circle area is:"+String.format("%.2f", this.getArea(r));
	}

	@Override
	double getArea(double x, double y) {
		return 0;
	}
}
